@layout("/common/_container.html",{js:["/assets/transport/transportCarrierFreight/transportCarrierFreight.js"]}){

<div class="layui-body-header">
    <span class="layui-body-header-title">承运商运费信息表管理</span>
</div>

<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
            <div class="layui-card">
                <div class="layui-card-body">
                    <!--开始-->
                    <div class="layui-tab layui-tab-brief" lay-filter="doTabBrief">
                        <ul class="layui-tab-title">
                            <li class="layui-this" id="auditBadge">财务已推送
                                <!--承运商权限-->
                                @if(shiro.hasPermission("/rec/carrierRecDetail/complaint")){
                                <span class="layui-badge layui-bg-orange" id="auditCount"></span>
                                @}
                            </li>
                            <li id="configBadge">承运商已确认
                                <!--财务权限-->
                                @if(shiro.hasPermission("/rec/carrierRecDetail/Reconfirm")){
                                <span class="layui-badge layui-bg-orange" id="confirmCount"></span>
                                @}
                            </li>
                            <li>可提报信息</li>
                            <li id="cBadge">承运商申诉
                                <span class="layui-badge" id="complaintCount"></span>
                            </li>
                        </ul>
                        <div class="layui-tab-content">
                            <!--标签1-->
                            <div class="layui-tab-item layui-show">
                                <div class="layui-form toolbar">
                                    <div class="layui-form-item">
                                        <div class="layui-inline">
                                            <!--                <button id="btnAdd" class="layui-btn icon-btn"><i class="layui-icon">&#xe654;</i>添加</button>-->
                                            <button id="btnExp" class="layui-btn icon-btn"><i class="layui-icon">&#xe67d;</i>导出
                                            </button>
                                        </div>
                                        <div class="layui-inline">
                                            <input id="condition" class="layui-input" type="text" placeholder="请输入运输单号"/>
                                        </div>
                                        <div class="layui-inline">
                                            <select id="operateId" lay-filter="operateId">
                                                <option value="">选择项目</option>
                                                @for(item in basicOperatelist!){
                                                <option value="${item.id}">${item.operateName}</option>
                                                @}
                                            </select>
                                        </div>
                                        <div class="layui-inline">
                                            <select id="carrierId" name="carrierId" lay-filter="carrierId" lay-verify="required" required lay-search/>
                                            <option value="">选择承运商</option>
                                            @for(item in carrierLists!){
                                            <option value="${item.id}">${item.carrierName}</option>
                                            @}
                                            </select>
                                        </div>
                                        <div class="layui-inline">
                                            <button id="btnSearch" class="layui-btn icon-btn"><i class="layui-icon">&#xe615;</i>搜索</button>
                                        </div>
                                        <div class="layui-inline">
                                            @if(shiro.hasPermission("/rec/carrierRecDetail/confirm")){
                                            <a class="layui-btn layui-bg-blue layui-btn" id="btnConfirm"><i class="layui-icon layui-icon-slider"></i>批量确定</a>
                                            @}
                                        </div>
                                        <div class="layui-inline">
                                            @if(shiro.hasPermission("/rec/carrierRecDetail/retract")){
                                            <a class="layui-btn layui-bg-red layui-btn" id="btnRetract"><i class="layui-icon layui-icon-slider"></i>批量撤回</a>
                                            @}
                                        </div>
                                    </div>
                                </div>
                                <table class="layui-table" id="transportCarrierFreightTable"
                                       lay-filter="transportCarrierFreightTable"></table>
                            </div>
                            <!--标签2-->
                            <div class="layui-tab-item">
                                <div class="layui-form toolbar">
                                    <div class="layui-form-item">
                                        <div class="layui-inline">
                                            <!--                <button id="btnAdd" class="layui-btn icon-btn"><i class="layui-icon">&#xe654;</i>添加</button>-->
                                            <button id="btnExp2" class="layui-btn icon-btn"><i class="layui-icon">&#xe67d;</i>导出
                                            </button>
                                        </div>
                                        <div class="layui-inline">
                                            <input id="condition2" class="layui-input" type="text" placeholder="请输入运输单号"/>
                                        </div>
                                        <div class="layui-inline">
                                            <select id="operateId2" lay-filter="operateId2">
                                                <option value="">选择项目</option>
                                                @for(item in basicOperatelist!){
                                                <option value="${item.id}">${item.operateName}</option>
                                                @}
                                            </select>
                                        </div>
                                        <div class="layui-inline">
                                            <select id="carrierId2" name="carrierId2" lay-filter="carrierId2" lay-verify="required" required lay-search/>
                                            <option value="">选择承运商</option>
                                            @for(item in carrierLists!){
                                            <option value="${item.id}">${item.carrierName}</option>
                                            @}
                                            </select>
                                        </div>
                                        <div class="layui-inline">
                                            <button id="btnSearch2" class="layui-btn icon-btn"><i class="layui-icon">&#xe615;</i>搜索
                                            </button>
                                        </div>
                                        <div class="layui-inline">
                                            @if(shiro.hasPermission("/rec/carrierRecDetail/Reconfirm")){
                                            <a class="layui-btn layui-bg-blue layui-btn" id="btnReconfirm"><i class="layui-icon layui-icon-slider"></i>批量确定</a>
                                            @}
                                        </div>
                                    </div>
                                </div>
                                <table class="layui-table" id="transportConfirm" lay-filter="transportConfirm"></table>
                            </div>
                            <!--标签3-->
                            <div class="layui-tab-item">
                                <div class="layui-form toolbar">
                                    <div class="layui-form-item">
                                        <div class="layui-inline">
                                            <!--                <button id="btnAdd" class="layui-btn icon-btn"><i class="layui-icon">&#xe654;</i>添加</button>-->
                                            <button id="btnExp3" class="layui-btn icon-btn"><i class="layui-icon">&#xe67d;</i>导出
                                            </button>
                                        </div>
                                        <div class="layui-inline">
                                            <input id="condition3" class="layui-input" type="text" placeholder="请输入运输单号"/>
                                        </div>
                                        <div class="layui-inline">
                                            <select id="operateId3" lay-filter="operateId3">
                                                <option value="">选择项目</option>
                                                @for(item in basicOperatelist!){
                                                <option value="${item.id}">${item.operateName}</option>
                                                @}
                                            </select>
                                        </div>
                                        <div class="layui-inline">
                                            <select id="carrierId3" name="carrierId3" lay-filter="carrierId3" lay-verify="required" required lay-search/>
                                            <option value="">选择承运商</option>
                                            @for(item in carrierLists!){
                                            <option value="${item.id}">${item.carrierName}</option>
                                            @}
                                            </select>
                                        </div>
                                        <div class="layui-inline">
                                            <button id="btnSearch3" class="layui-btn icon-btn"><i class="layui-icon">&#xe615;</i>搜索
                                            </button>
                                        </div>
                                    </div>
                                </div>
                                <table class="layui-table" id="transportReConfirm" lay-filter="transportReConfirm"></table>
                            </div>
                            <!--标签4-->
                            <div class="layui-tab-item">
                                <div class="layui-form toolbar">
                                    <div class="layui-form-item">
                                        <div class="layui-inline">
                                            <!--                <button id="btnAdd" class="layui-btn icon-btn"><i class="layui-icon">&#xe654;</i>添加</button>-->
                                            <button id="btnExp4" class="layui-btn icon-btn"><i class="layui-icon">&#xe67d;</i>导出
                                            </button>
                                        </div>
                                        <div class="layui-inline">
                                            <input id="condition4" class="layui-input" type="text" placeholder="请输入运输单号"/>
                                        </div>
                                        <div class="layui-inline">
                                            <select id="operateId4" lay-filter="operateId4">
                                                <option value="">选择项目</option>
                                                @for(item in basicOperatelist!){
                                                <option value="${item.id}">${item.operateName}</option>
                                                @}
                                            </select>
                                        </div>
                                        <div class="layui-inline">
                                            <select id="carrierId4" name="carrierId4" lay-filter="carrierId4" lay-verify="required" required lay-search/>
                                            <option value="">选择承运商</option>
                                            @for(item in carrierLists!){
                                            <option value="${item.id}">${item.carrierName}</option>
                                            @}
                                            </select>
                                        </div>
                                        <div class="layui-inline">
                                            <button id="btnSearch4" class="layui-btn icon-btn"><i class="layui-icon">&#xe615;</i>搜索
                                            </button>
                                        </div>
                                    </div>
                                </div>
                                <table class="layui-table" id="transportComplaint" lay-filter="transportComplaint"></table>
                            </div>
                        </div>
                    </div>
                    <!--结束-->
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 4个标签页的货运订单号的点击事件以及颜色 -->
<script type="text/html" id="dispatchNumberTpl">
    {{#  if(d.dispatchNumber != '' && d.dispatchNumber != null){ }}
    <span lay-event="tooTimeLine" style="color: #0000FF">{{ d.dispatchNumber }}</span>
    {{#  } }}
</script>

<script type="text/html" id="dispatchNumberTpl2">
    {{#  if(d.dispatchNumber != '' && d.dispatchNumber != null){ }}
    <span lay-event="tooTimeLine2" style="color: #0000FF">{{ d.dispatchNumber }}</span>
    {{#  } }}
</script>

<script type="text/html" id="dispatchNumberTpl3">
    {{#  if(d.dispatchNumber != '' && d.dispatchNumber != null){ }}
    <span lay-event="tooTimeLine3" style="color: #0000FF">{{ d.dispatchNumber }}</span>
    {{#  } }}
</script>

<script type="text/html" id="dispatchNumberTpl4">
    {{#  if(d.dispatchNumber != '' && d.dispatchNumber != null){ }}
    <span lay-event="tooTimeLine4" style="color: #0000FF">{{ d.dispatchNumber }}</span>
    {{#  } }}
</script>
<!----------------------------------------------------------->


<!-- 4个标签页的按钮权限 -->
<!-- 承运商确认 /rec/carrierRecDetail/confirm -->
<!-- 承运商申诉 /rec/carrierRecDetail/complaint -->
<!-- 财务撤回 /rec/carrierRecDetail/retract -->
<!-- 财务确认 /rec/carrierRecDetail/Reconfirm -->
<!-- 财务回传OA /rec/carrierRecDetail/generate -->
<!-- 承运商撤回申诉 /rec/carrierRecDetail/carrierRetract -->
<!-- 财务已更正 /rec/carrierRecDetail/financeRetract -->

<script type="text/html" id="tableBar">
    <!--    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit">修改</a>-->
    <!--    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete">删除</a>-->
    @if(shiro.hasPermission("/rec/carrierRecDetail/confirm")){
    <a class="layui-btn layui-bg-blue layui-btn-xs" lay-event="confirm">确定</a>
    @}
    @if(shiro.hasPermission("/rec/carrierRecDetail/complaint")){
    <a class="layui-btn layui-bg-orange layui-btn-xs" lay-event="complaint">申诉</a>
    @}
    @if(shiro.hasPermission("/rec/carrierRecDetail/retract")){
    <a class="layui-btn layui-bg-red layui-btn-xs" lay-event="retract">撤回</a>
    @}
</script>

<script type="text/html" id="tableBar2">
    @if(shiro.hasPermission("/rec/carrierRecDetail/Reconfirm")){
    <a class="layui-btn layui-bg-blue layui-btn-xs" lay-event="Reconfirm">财务确认</a>
    <a class="layui-btn layui-bg-red layui-btn-xs" lay-event="retract">撤回</a>
    @} else {
    <a class="layui-btn layui-btn-disabled layui-btn-xs" lay-event="ing">待财务确认</a>
    @}
</script>

<script type="text/html" id="tableBar3">
    @if(shiro.hasPermission("/rec/carrierRecDetail/generate")){
    <a class="layui-btn layui-bg-blue layui-btn-xs" lay-event="generate">生成应付单</a>
    @} else {
    <a class="layui-btn layui-btn-disabled layui-btn-xs" lay-event="ing">已完成</a>
    @}
</script>

<script type="text/html" id="tableBar4">
    @if(shiro.hasPermission("/rec/carrierRecDetail/carrierRetract")){
    <a class="layui-btn layui-bg-blue layui-btn-xs" lay-event="carrierRetract">承运商撤回</a>
    @}
    @if(shiro.hasPermission("/rec/carrierRecDetail/financeRetract")){
    <a class="layui-btn layui-bg-blue layui-btn-xs" lay-event="financeRetract">已更正</a>
    @}
</script>
<!----------------------------------------------------------->


<script type="text/html" id="notes">
    <span style="color: #acaa01; font-weight: 600;">{{ d.notes }}</span>
</script>



<script type="text/html" id="recStateTpl">
    {{#  if(d.recStatus === '财务已审核'){ }}
    <span style="color: #43CF7C; font-weight: 600;">{{ d.recStatus }}</span>
    {{#  } else if (d.recStatus === '承运商已确认'){ }}
    <span style="color: #007BFF; font-weight: 600;">{{ d.recStatus }}</span>
    {{#  } else if (d.recStatus === '承运商申述'){ }}
    <span style="color: #cf09a1; font-weight: 600;">{{ d.recStatus }}</span>
    {{#  } else if (d.recStatus === '财务已确定'){ }}
    <span style="color: #dc0707; font-weight: 600;">{{ d.recStatus }}</span>
    {{#  } else { }}
    <span style="color: #FFC300; font-weight: 600;">{{ d.recStatus }}</span>
    {{#  } }}
</script>

@}